set define off
set verify off
set serveroutput on size 1000000
set feedback off
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
begin wwv_flow.g_import_in_progress := true; end; 
/
 
 
--application/set_environment
prompt  APPLICATION 126 - SAS
--
-- Application Export:
--   Application:     126
--   Name:            SAS
--   Date and Time:   13:35 Sunday January 8, 2012
--   Exported By:     SASDEV
--   Flashback:       0
--   Export Type:     Page Export
--   Version: 4.0.2.00.08
 
-- Import:
--   Using application builder
--   or
--   Using SQL*Plus as the Oracle user APEX_040000 or as the owner (parsing schema) of the application.
 
 
--       AAAA       PPPPP   EEEEEE  XX      XX
--      AA  AA      PP  PP  EE       XX    XX
--     AA    AA     PP  PP  EE        XX  XX
--    AAAAAAAAAA    PPPPP   EEEE       XXXX
--   AA        AA   PP      EE        XX  XX
--  AA          AA  PP      EE       XX    XX
--  AA          AA  PP      EEEEEE  XX      XX
prompt  Set Credentials...
 
begin
 
  -- Assumes you are running the script connected to SQL*Plus as the Oracle user APEX_040000 or as the owner (parsing schema) of the application.
  wwv_flow_api.set_security_group_id(p_security_group_id=>nvl(wwv_flow_application_install.get_workspace_id,12824420416709482));
 
end;
/

begin wwv_flow.g_import_in_progress := true; end;
/
begin 

select value into wwv_flow_api.g_nls_numeric_chars from nls_session_parameters where parameter='NLS_NUMERIC_CHARACTERS';

end;

/
begin execute immediate 'alter session set nls_numeric_characters=''.,''';

end;

/
begin wwv_flow.g_browser_language := 'en'; end;
/
prompt  Check Compatibility...
 
begin
 
-- This date identifies the minimum version required to import this file.
wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2010.05.13');
 
end;
/

prompt  Set Application ID...
 
begin
 
   -- SET APPLICATION ID
   wwv_flow.g_flow_id := nvl(wwv_flow_application_install.get_application_id,126);
   wwv_flow_api.g_id_offset := nvl(wwv_flow_application_install.get_offset,0);
null;
 
end;
/

PROMPT ...Remove page 117
 
begin
 
wwv_flow_api.remove_page (p_flow_id=>wwv_flow.g_flow_id, p_page_id=>117);
 
end;
/

 
--application/pages/page_00117
prompt  ...PAGE 117: Purchasing Details
--
 
begin
 
wwv_flow_api.create_page (
  p_flow_id => wwv_flow.g_flow_id
 ,p_id => 117
 ,p_name => 'Purchasing Details'
 ,p_step_title => 'Purchasing Details'
 ,p_allow_duplicate_submissions => 'Y'
 ,p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS'
 ,p_first_item => 'AUTO_FIRST_ITEM'
 ,p_include_apex_css_js_yn => 'Y'
 ,p_autocomplete_on_off => 'ON'
 ,p_html_page_header => 
'<script language="JavaScript" type="text/javascript">'||chr(10)||
'function calcPurchaseLine(){'||chr(10)||
'  var l_unit_price = $x(''P117'').value;'||chr(10)||
'  var enc = $v(''f01_''+vRow);'||chr(10)||
'}'||chr(10)||
'function getCurrentRow(pthis)'||chr(10)||
'{'||chr(10)||
' '||chr(10)||
' var current;'||chr(10)||
' vCurrent = pthis.name;'||chr(10)||
' '||chr(10)||
'  for (i=0;i<document.getElementsByName(vCurrent ).length;i++)'||chr(10)||
'  {'||chr(10)||
'   if (document.getElementsByName(vCurrent )[i].id == pthis.id ) // This is current row'||chr(10)||
'   {'||chr(10)||
'      return '||
'i + 1;'||chr(10)||
'   }'||chr(10)||
'  }     '||chr(10)||
'}'||chr(10)||
''||chr(10)||
'// labels and columns'||chr(10)||
'//<tr class="highlight-row">'||chr(10)||
'//<td headers="CHECK$01" class="data"><label for="f01_0001" class="hideMe508">CHECK$01</label>'||chr(10)||
'//<td headers="PURCHASE_LINE_ID_DISPLAY" class="data">5</td>'||chr(10)||
'//<td headers="LINE_NUMBER" class="data">(null)</td>'||chr(10)||
'//<td headers="DESCRIPTION" class="data"><label for="f04_0001" class="hideMe508">DESCRIPTION</label>'||chr(10)||
'//<td headers="'||
'EXPENSE_ID" class="data"><label for="f05_0001" class="hideMe508">EXPENSE_ID</label>'||chr(10)||
'//<td headers="QUANTITY" class="data"><label for="f06_0001" class="hideMe508">QUANTITY</label>'||chr(10)||
'//<td headers="UOM" class="data"><label for="f07_0001" class="hideMe508">UOM</label>'||chr(10)||
'//<td headers="UNIT_PRICE" class="data"><label for="f08_0001" class="hideMe508">UNIT_PRICE</label>'||chr(10)||
'//<td headers="AMOUNT_EXCL_TAX" class'||
'="data"><label for="f09_0001" class="hideMe508">AMOUNT_EXCL_TAX</label>'||chr(10)||
'//<td headers="TAX_RATE" class="data"><label for="f10_0001" class="hideMe508">TAX_RATE</label>'||chr(10)||
'//<td headers="TAX_AMOUNT" class="data"><label for="f11_0001" class="hideMe508">TAX_AMOUNT</label>'||chr(10)||
'//<td headers="AMOUNT_INCL_TAX" class="data"><label for="f12_0001" class="hideMe508">AMOUNT_INCL_TAX</label>'||chr(10)||
'//</tr>'||chr(10)||
''||chr(10)||
'function setLine'||
'Number(pThis){'||chr(10)||
''||chr(10)||
'var vRow = pThis.id.substr(pThis.id.indexOf(''_'')+1);'||chr(10)||
'// var l2 = html_GetElement(''f02_''+vRow).value; alert(''2:''+l2);'||chr(10)||
''||chr(10)||
'}'||chr(10)||
''||chr(10)||
'// display unit price on unit price column'||chr(10)||
'function setPrice(pThis)'||chr(10)||
'{'||chr(10)||
'//alert(''setPrice'');'||chr(10)||
'//var l1 = html_GetElement(''f09_''+vRow).value;'||chr(10)||
'//alert(l1);'||chr(10)||
''||chr(10)||
'var vRow = pThis.id.substr(pThis.id.indexOf(''_'')+1);'||chr(10)||
'//if (html_GetElement(''f09_''+vRow).value.length == 0)'||chr(10)||
'// {'||
''||chr(10)||
'//html_GetElement(''f09_''+vRow).value = document.getElementById(''P117_BILL_RATE'').value;'||chr(10)||
'// }'||chr(10)||
''||chr(10)||
' if ((html_GetElement(''f08_''+vRow).value.length!=0) && (html_GetElement(''f06_''+vRow).value.length!=0))'||chr(10)||
'{'||chr(10)||
''||chr(10)||
'// var l7 = html_GetElement(''f07_''+vRow).value; alert(''7:''+l7);'||chr(10)||
'// var l8 = html_GetElement(''f08_''+vRow).value; alert(''8:''+l8);'||chr(10)||
'// var l9 = html_GetElement(''f09_''+vRow).value; alert(''9:''+l9);'||chr(10)||
'// var '||
'l10 = html_GetElement(''f10_''+vRow).value; alert(''10:''+l10);'||chr(10)||
''||chr(10)||
''||chr(10)||
'html_GetElement(''f10_''+vRow).value = format_number ('||chr(10)||
'    parseFloat(stripNN(html_GetElement(''f07_''+vRow).value)) *'||chr(10)||
'    parseFloat(stripNN(html_GetElement(''f09_''+vRow).value)) , 2);'||chr(10)||
'//html_GetElement(''f09_''+vRow).value = format_number ('||chr(10)||
'//    parseFloat(stripNN(html_GetElement(''f08_''+vRow).value)) *'||chr(10)||
'//    parseFloat(stripNN(html_GetEleme'||
'nt(''f06_''+vRow).value)) , 2);'||chr(10)||
'}'||chr(10)||
''||chr(10)||
'}'||chr(10)||
''||chr(10)||
'function calculateTax(pThis)'||chr(10)||
'{'||chr(10)||
'//alert(''calculateTax'');'||chr(10)||
''||chr(10)||
'var vRow = pThis.id.substr(pThis.id.indexOf(''_'')+1);'||chr(10)||
'//html_GetElement(''f04_''+vRow).value = parseInt(vRow);'||chr(10)||
''||chr(10)||
'//compute for amount if unit price and quantity has value'||chr(10)||
'// if ((html_GetElement(''f08_''+vRow).value.length!=0) && (html_GetElement(''f06_''+vRow).value.length!=0))'||chr(10)||
'//{'||chr(10)||
'//html_GetElement(''f09_''+vRow).'||
'value = format_number ('||chr(10)||
'//    parseFloat(stripNN(html_GetElement(''f08_''+vRow).value)) *'||chr(10)||
'//    parseFloat(stripNN(html_GetElement(''f06_''+vRow).value)) , 2);'||chr(10)||
'//}'||chr(10)||
''||chr(10)||
'//computation here'||chr(10)||
''||chr(10)||
'html_GetElement(''f12_''+vRow).value = format_number ('||chr(10)||
'    parseFloat(stripNN(html_GetElement(''f10_''+vRow).value)) *'||chr(10)||
'    (parseFloat(stripNN(html_GetElement(''f11_''+vRow).value)) / 100) , 2);'||chr(10)||
'html_GetElement(''f13_''+vRow).v'||
'alue = format_number ('||chr(10)||
'    parseFloat(stripNN(html_GetElement(''f10_''+vRow).value)) +'||chr(10)||
'    parseFloat(stripNN(html_GetElement(''f12_''+vRow).value)) , 2);'||chr(10)||
''||chr(10)||
'}'||chr(10)||
''||chr(10)||
'function iFocus(e,pThis,num)'||chr(10)||
'{'||chr(10)||
'//alert(''iFocus'');'||chr(10)||
'var vRow = pThis.id.substr(pThis.id.indexOf(''_'')+1);'||chr(10)||
'var keynum'||chr(10)||
'if(window.event) // IE'||chr(10)||
'{'||chr(10)||
'keynum = e.keyCode'||chr(10)||
'}'||chr(10)||
'else if(e.which) // Netscape/Firefox/Opera'||chr(10)||
'{'||chr(10)||
'keynum = e.which'||chr(10)||
'}'||chr(10)||
'if (keynum==13){'||chr(10)||
'docu'||
'ment.getElementById(''f''+num+''_''+vRow).focus();'||chr(10)||
'}'||chr(10)||
'}'||chr(10)||
''||chr(10)||
'function stripNN( str )'||chr(10)||
'	{'||chr(10)||
'	  str += '''';'||chr(10)||
'	  var rgx = /^\d|\.|-$/;'||chr(10)||
'	  var out = '''';'||chr(10)||
'	  for( var i = 0; i < str.length; i++ )'||chr(10)||
'	  {'||chr(10)||
'	    if( rgx.test( str.charAt(i) ) ){'||chr(10)||
'	      if( !( ( str.charAt(i) == ''.'' && out.indexOf( ''.'' ) != -1 ) ||'||chr(10)||
'	             ( str.charAt(i) == ''-'' && out.length != 0 ) ) ){'||chr(10)||
'	        out += str.charAt(i);'||chr(10)||
'	      }'||chr(10)||
'	    }'||chr(10)||
''||
'	  }'||chr(10)||
'	  return out;'||chr(10)||
'	}'||chr(10)||
''||chr(10)||
'function format_number(pnumber,decimals){'||chr(10)||
'	    if (isNaN(pnumber)) { return 0};'||chr(10)||
'	    if (pnumber=='''') { return 0};'||chr(10)||
'	    var snum = new String(pnumber);'||chr(10)||
'	    var sec = snum.split(''.'');'||chr(10)||
'	    var whole = parseFloat(sec[0]);'||chr(10)||
'	    var result = '''';'||chr(10)||
'	    if(sec.length > 1){'||chr(10)||
'	        var dec = new String(sec[1]);'||chr(10)||
'	        dec = String(parseFloat(sec[1])/Math.pow(10,(dec.length - de'||
'cimals)));'||chr(10)||
'	        dec = String(whole + Math.round(parseFloat(dec))/Math.pow(10,decimals));'||chr(10)||
'	        var dot = dec.indexOf(''.'');'||chr(10)||
'	        if(dot == -1){'||chr(10)||
'	            dec += ''.'';'||chr(10)||
'	            dot = dec.indexOf(''.'');'||chr(10)||
'	        }'||chr(10)||
'	        while(dec.length <= dot + decimals) { dec += ''0''; }'||chr(10)||
'	        result = dec;'||chr(10)||
'	    } else{'||chr(10)||
'	        var dot;'||chr(10)||
'	        var dec = new String(whole);'||chr(10)||
'	        dec += ''.'';'||
''||chr(10)||
'	        dot = dec.indexOf(''.'');'||chr(10)||
'	        while(dec.length <= dot + decimals) { dec += ''0''; }'||chr(10)||
'	        result = dec;'||chr(10)||
'	    }'||chr(10)||
'	    return result;'||chr(10)||
'	}'||chr(10)||
''||chr(10)||
'</script>'
 ,p_javascript_code => 
'var htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'
 ,p_page_is_public_y_n => 'N'
 ,p_protection_level => 'N'
 ,p_cache_page_yn => 'N'
 ,p_cache_timeout_seconds => 21600
 ,p_cache_by_user_yn => 'N'
 ,p_help_text => 
'No help is available for this page.'
 ,p_last_updated_by => 'SASDEV'
 ,p_last_upd_yyyymmddhh24miss => '20120108131524'
  );
null;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 18292311098955800 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 117,
  p_plug_name=> 'Purchasing Details',
  p_region_name=>'',
  p_plug_template=> 19779324498171350+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'BEFORE_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 18298020964955828 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 117,
  p_plug_name=> 'Breadcrumb',
  p_region_name=>'',
  p_plug_template=> 19778931358171350+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 1,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'REGION_POSITION_01',
  p_plug_source=> s,
  p_plug_source_type=> 'M'|| to_char(19786209554171386 + wwv_flow_api.g_id_offset),
  p_menu_template_id=> 19783809985171359+ wwv_flow_api.g_id_offset,
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select purchase_line_id'||chr(10)||
'      ,purchase_line_id PURCHASE_LINE_ID_DISPLAY'||chr(10)||
'      ,purchase_header_id'||chr(10)||
'      ,line_number'||chr(10)||
'      ,description'||chr(10)||
'      ,expense_id'||chr(10)||
'      ,quantity'||chr(10)||
'      ,uom'||chr(10)||
'      ,unit_price'||chr(10)||
'      ,amount_excl_tax'||chr(10)||
'      ,tax_rate'||chr(10)||
'      ,tax_amount'||chr(10)||
'      ,amount_incl_tax'||chr(10)||
'from   purchase_lines'||chr(10)||
'where  purchase_header_id= :P117_PURCHASE_HEADER_ID';

wwv_flow_api.create_report_region (
  p_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 117,
  p_name=> 'Purchasing Lines',
  p_region_name=>'',
  p_template=> 19780125577171351+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 15,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'UPDATABLE_SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'P117_PURCHASE_HEADER_ID',
  p_display_condition_type=> 'ITEM_IS_NOT_NULL',
  p_plug_caching=> 'NOT_CACHED',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 19782834517171358+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '10',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> '(null)',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No data found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_query_asc_image=> 'apex/builder/dup.gif',
  p_query_asc_image_attr=> 'width="16" height="16" alt="" ',
  p_query_desc_image=> 'apex/builder/ddown.gif',
  p_query_desc_image_attr=> 'width="16" height="16" alt="" ',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18316109769427677 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CHECK$01',
  p_column_display_sequence=> 1,
  p_column_heading=> '&nbsp;',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'CHECKBOX',
  p_is_required=> false,
  p_pk_col_source=> s,
  p_derived_column=> 'Y',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s:=s||'PURCHASE_LINES_SQ1';

wwv_flow_api.create_report_columns (
  p_id=> 18312730496427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'PURCHASE_LINE_ID',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Purchase Line Id',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>1,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'HIDDEN',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '16',
  p_is_required=> false,
  p_pk_col_source_type=> 'S',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'PURCHASE_LINE_ID',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18312825822427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'PURCHASE_LINE_ID_DISPLAY',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Line Id',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'ESCAPE_SC',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '16',
  p_is_required=> false,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'PURCHASE_LINE_ID_DISPLAY',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18312922179427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'PURCHASE_HEADER_ID',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Header Id',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'DISPLAY_AND_SAVE',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '16',
  p_is_required=> false,
  p_column_default=> 'P117_PURCHASE_HEADER_ID',
  p_column_default_type=> 'ITEM',
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'PURCHASE_HEADER_ID',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18313011211427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'LINE_NUMBER',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Line Number',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'DISPLAY_AND_SAVE',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '16',
  p_is_required=> false,
  p_column_default=> 's_general_pkg.get_next_purchase_line_no(:P117_PURCHASE_HEADER_ID)',
  p_column_default_type=> 'FUNCTION',
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'LINE_NUMBER',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18338812629682161 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Description',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT',
  p_lov_show_nulls=> 'NO',
  p_cattributes=> 'style="text-align:right;" onfocus="setLineNumber(this);"',
  p_is_required=> false,
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18313101374427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'EXPENSE_ID',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Expense Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'SELECT_LIST_FROM_LOV',
  p_named_lov=>19887024379934296 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_column_width=> '16',
  p_is_required=> false,
  p_column_default=> 'nvl2(:P117_CONTRACT_ID,2,null)',
  p_column_default_type=> 'FUNCTION',
  p_lov_display_extra=> 'NO',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'EXPENSE_ID',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18338924871682161 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'QUANTITY',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Quantity',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '5',
  p_cattributes=> 'style="text-align:right;" onblur="calculateTax(this);" onkeydown="iFocus(event,this,''09'');" ',
  p_is_required=> false,
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18313217665427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'UOM',
  p_column_display_sequence=> 9,
  p_column_heading=> 'UOM',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'SELECT_LIST',
  p_inline_lov=> 'Days;DAYS,Hours;HOURS',
  p_lov_show_nulls=> 'YES',
  p_lov_null_text=> '- Select UOM -',
  p_column_width=> '15',
  p_cattributes=> 'onchange="calcPurchaseLine();"',
  p_is_required=> false,
  p_column_default=> 'P117_RATE_UNIT',
  p_column_default_type=> 'ITEM',
  p_lov_display_extra=> 'NO',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'UOM',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18313312469427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'UNIT_PRICE',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Unit Price',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '8',
  p_cattributes=> 'style="text-align:right;" onblur="calculateTax(this);" onkeydown="iFocus(event,this,''09'');" onfocus="setPrice(this);"',
  p_is_required=> false,
  p_column_default=> 'P117_BILL_RATE',
  p_column_default_type=> 'ITEM',
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'UNIT_PRICE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18313408023427666 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'AMOUNT_EXCL_TAX',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Amount Excl Tax',
  p_column_format=> '999G999G999G999G990D00',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '16',
  p_cattributes=> 'style="text-align:right;" onblur="calculateTax(this);" onkeydown="iFocus(event,this,''09'');"',
  p_is_required=> false,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'AMOUNT_EXCL_TAX',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18313511807427667 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'TAX_RATE',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Tax Rate',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'SELECT_LIST_FROM_QUERY',
  p_inline_lov=> 'select vat_rate_name d'||chr(10)||
'      ,vate_rate r'||chr(10)||
'from vat_rates',
  p_lov_show_nulls=> 'YES',
  p_lov_null_text=> '- Select Tax Rate -',
  p_column_width=> '16',
  p_cattributes=> 'onchange="calculateTax(this);" onkeydown="iFocus(event,this,''10'');"',
  p_is_required=> false,
  p_lov_display_extra=> 'NO',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'TAX_RATE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18339023672682161 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'TAX_AMOUNT',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Tax Amount',
  p_column_format=> '999G999G999G999G990D00',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT',
  p_lov_show_nulls=> 'NO',
  p_cattributes=> 'style="text-align:right;" readonly="readonly" onkeydown="iFocus(event,this,''11'');"',
  p_is_required=> false,
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 18313622156427667 + wwv_flow_api.g_id_offset,
  p_region_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'AMOUNT_INCL_TAX',
  p_column_display_sequence=> 14,
  p_column_heading=> 'Amount Incl Tax',
  p_column_format=> '999G999G999G999G990D00',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '16',
  p_cattributes=> 'style="text-align:right;" readonly="readonly"',
  p_is_required=> false,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_ref_schema=> 'SAS_DEV',
  p_ref_table_name=> 'PURCHASE_LINES',
  p_ref_column_name=> 'AMOUNT_INCL_TAX',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 18292619505955800 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 30,
  p_button_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> '',
  p_button_execute_validations=>'Y',
  p_button_condition=> 'P117_PURCHASE_HEADER_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18313814979427671 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 30,
  p_button_plug_id => 18312420559427663+wwv_flow_api.g_id_offset,
  p_button_name    => 'SUBMIT',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Submit',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> '',
  p_button_execute_validations=>'Y',
  p_button_condition_type=> 'NEVER',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18314019644427671 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 40,
  p_button_plug_id => 18312420559427663+wwv_flow_api.g_id_offset,
  p_button_name    => 'ADD',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Add Row',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:addRow();',
  p_button_execute_validations=>'N',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18292917101955801 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 10,
  p_button_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:116:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18313728303427671 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 10,
  p_button_plug_id => 18312420559427663+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:116:&SESSION.::&DEBUG.:::',
  p_button_execute_validations=>'Y',
  p_button_condition_type=> 'NEVER',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18292527410955800 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 40,
  p_button_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> '',
  p_button_execute_validations=>'Y',
  p_button_condition=> 'P117_PURCHASE_HEADER_ID',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18382330608255641 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 50,
  p_button_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE2',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:117:&SESSION.::&DEBUG.:117::',
  p_button_execute_validations=>'Y',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18292724881955800 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 20,
  p_button_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Delete',
  p_button_position=> 'REGION_TEMPLATE_DELETE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:apex.confirm(htmldb_delete_message,''DELETE'');',
  p_button_execute_validations=>'N',
  p_button_condition=> 'P117_PURCHASE_HEADER_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18313919019427671 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 117,
  p_button_sequence=> 20,
  p_button_plug_id => 18312420559427663+wwv_flow_api.g_id_offset,
  p_button_name    => 'MULTI_ROW_DELETE',
  p_button_image   => 'template:'||to_char(19778322016171348+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Delete Checked',
  p_button_position=> 'REGION_TEMPLATE_DELETE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:apex.confirm(htmldb_delete_message,''MULTI_ROW_DELETE'');',
  p_button_execute_validations=>'N',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>18293504859955802 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_branch_action=> 'f?p=&APP_ID.:116:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_condition_type=> 'NEVER',
  p_save_state_before_branch_yn=>'Y',
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>18316225190427678 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_branch_action=> 'f?p=&APP_ID.:117:&SESSION.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_save_state_before_branch_yn=>'Y',
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18293707620955802 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_PURCHASE_HEADER_ID',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Purchase Header Id',
  p_source=>'PURCHASE_HEADER_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_HIDDEN',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> null,
  p_cHeight=> null,
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783512971171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_attribute_01 => 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18293923285955811 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_INVOICE_NUMBER',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Invoice Number',
  p_source=>'INVOICE_NUMBER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_TEXT_FIELD',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 120,
  p_cHeight=> 1,
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'YES',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'N',
  p_attribute_02 => 'N',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18294121766955812 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_INVOICE_DATE',
  p_data_type=> 'VARCHAR',
  p_is_required=> true,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 70,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default=> 'to_char(sysdate,''DD-Mon-RRRR'')',
  p_item_default_type=> 'PLSQL_EXPRESSION',
  p_prompt=>'Invoice Date',
  p_format_mask=>'DD-MON-YYYY',
  p_source=>'INVOICE_DATE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_DATE_PICKER',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 16,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'YES',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_04 => 'button',
  p_attribute_05 => 'N',
  p_attribute_07 => 'NONE',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18294327307955813 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_SUPPLIER_ID',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source=>'SUPPLIER_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_SELECT_LIST',
  p_named_lov=> 'SUPPLIERS',
  p_lov=> 'select supplier_name d, supplier_id r'||chr(10)||
'from   suppliers'||chr(10)||
'where entity_id=:F112_ENTITY_ID'||chr(10)||
'order by 1',
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Supplier -',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line=> 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'NONE',
  p_attribute_02 => 'N',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18294508235955813 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_CONTRACT_ID',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contract',
  p_source=>'CONTRACT_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_SELECT_LIST',
  p_lov=> 'select co.contract_number||'' - ''||co.end_client     ,co.contract_id r'||chr(10)||
'from   suppliers su'||chr(10)||
'      ,contractor cr'||chr(10)||
'      ,contract co'||chr(10)||
'where 1 = 1 '||chr(10)||
'and   su.supplier_id = cr.supplier_id'||chr(10)||
'and  co.contractor_id = cr.contractor_id'||chr(10)||
'and   su.entity_id = :F112_ENTITY_ID'||chr(10)||
'and   su.supplier_id = :P117_SUPPLIER_ID'||chr(10)||
'',
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Contract -',
  p_lov_null_value=> '',
  p_lov_cascade_parent_items=> 'P117_SUPPLIER_ID',
  p_ajax_optimize_refresh=> 'Y',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'NONE',
  p_attribute_02 => 'N',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18294722664955813 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_CURRENCY_CODE',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Currency Code',
  p_source=>'CURRENCY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_SELECT_LIST',
  p_named_lov=> 'CURRENCIES',
  p_lov=> 'select description d, currency_code r'||chr(10)||
'from   currencies'||chr(10)||
'order by 1',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_lov_cascade_parent_items=> 'P117_CONTRACT_ID',
  p_ajax_items_to_submit=> 'P117_CONTRACT_ID',
  p_ajax_optimize_refresh=> 'Y',
  p_cSize=> 32,
  p_cMaxlength=> 3,
  p_cHeight=> 1,
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'NONE',
  p_attribute_02 => 'N',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18294901310955814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_ENTITY_ID',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 110,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default=> '&F112_ENTITY_ID.',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Entity Id',
  p_source=>'ENTITY_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_HIDDEN',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 8,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line=> 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'YES',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'Y',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18295104657955814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_PERIOD_ID',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 80,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Period',
  p_source=>'PERIOD_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_SELECT_LIST',
  p_lov=> 'select period_name d, period_id r '||chr(10)||
'from   periods p '||chr(10)||
'where  p.financial_period_id=:F112_CUR_FIN_PERIOD_ID '||chr(10)||
'and    period_num!=0 '||chr(10)||
'order by period_num',
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Period -',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'NONE',
  p_attribute_02 => 'N',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18301720547024820 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 90,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'NATIVE_TEXTAREA',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 35,
  p_cMaxlength=> 4000,
  p_cHeight=> 7,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line=> 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT-CENTER',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'YES',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'N',
  p_attribute_02 => 'Y',
  p_attribute_03 => 'N',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18302216996024821 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_EXCHANGE_RATE',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 100,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Exchange Rate',
  p_source=>'EXCHANGE_RATE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_NUMBER_FIELD',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 16,
  p_cMaxlength=> 4000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line=> 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT-CENTER',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'YES',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_03 => 'right',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18328703380676336 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_ADDRESS_LOV',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Address',
  p_source=>'ADDRESS_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'NATIVE_POPUP_LOV',
  p_lov=> 'select ad.address1||'', ''||'||chr(10)||
'       ad.street||'', ''||'||chr(10)||
'       ad.village||'', ''||'||chr(10)||
'       ad.town||'', ''||'||chr(10)||
'       ad.region||'', ''||'||chr(10)||
'       ad.country||'', ''||'||chr(10)||
'       ad.postcode||'', ''||'||chr(10)||
'       ad.city d'||chr(10)||
'      ,ad.address_id r'||chr(10)||
'from   suppliers su'||chr(10)||
'      ,address ad'||chr(10)||
'where 1 = 1 '||chr(10)||
'and   su.supplier_id = ad.supplier_id'||chr(10)||
'and su.supplier_id=:P117_SUPPLIER_ID',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 35,
  p_cMaxlength=> 4000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line=> 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'RIGHT',
  p_field_alignment=> 'LEFT-CENTER',
  p_field_template=> 19783407425171359+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'NOT_ENTERABLE',
  p_attribute_02 => 'FIRST_ROWSET',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18372315809940465 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_RATE_UNIT',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 120,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'NATIVE_HIDDEN',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 4000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'LEFT',
  p_field_alignment=> 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'YES',
  p_protection_level => 'N',
  p_escape_on_http_output => 'Y',
  p_attribute_01 => 'N',
  p_show_quick_picks=>'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18372523428942725 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 117,
  p_name=>'P117_BILL_RATE',
  p_data_type=> 'VARCHAR',
  p_is_required=> false,
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 130,
  p_item_plug_id => 18292311098955800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type=> 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'NATIVE_HIDDEN',
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 4000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line=> 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan=> 1,
  p_rowspan=> 1,
  p_label_alignment=> 'LEFT',
  p_field_alignment=> 'LEFT',
  p_is_persistent=> 'Y',
  p_attribute_01 => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18314809366427674 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_tabular_form_region_id => 18312420559427663 + wwv_flow_api.g_id_offset,
  p_validation_name => 'EXPENSE_ID must be numeric',
  p_validation_sequence=> 50,
  p_validation => 'EXPENSE_ID',
  p_validation_type => 'COL_IS_NUMERIC',
  p_error_message => '#COLUMN_HEADER# must be numeric.',
  p_when_button_pressed=> 18313814979427671 + wwv_flow_api.g_id_offset,
  p_associated_column=> 'EXPENSE_ID',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18315024885427675 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_tabular_form_region_id => 18312420559427663 + wwv_flow_api.g_id_offset,
  p_validation_name => 'UNIT_PRICE must be numeric',
  p_validation_sequence=> 70,
  p_validation => 'UNIT_PRICE',
  p_validation_type => 'COL_IS_NUMERIC',
  p_error_message => '#COLUMN_HEADER# must be numeric.',
  p_when_button_pressed=> 18313814979427671 + wwv_flow_api.g_id_offset,
  p_associated_column=> 'UNIT_PRICE',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18315221436427675 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_tabular_form_region_id => 18312420559427663 + wwv_flow_api.g_id_offset,
  p_validation_name => 'AMOUNT_EXCL_TAX must be numeric',
  p_validation_sequence=> 80,
  p_validation => 'AMOUNT_EXCL_TAX',
  p_validation_type => 'COL_IS_NUMERIC',
  p_error_message => '#COLUMN_HEADER# must be numeric.',
  p_when_button_pressed=> 18313814979427671 + wwv_flow_api.g_id_offset,
  p_associated_column=> 'AMOUNT_EXCL_TAX',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18315411841427675 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_tabular_form_region_id => 18312420559427663 + wwv_flow_api.g_id_offset,
  p_validation_name => 'TAX_RATE must be numeric',
  p_validation_sequence=> 90,
  p_validation => 'TAX_RATE',
  p_validation_type => 'COL_IS_NUMERIC',
  p_error_message => '#COLUMN_HEADER# must be numeric.',
  p_when_button_pressed=> 18313814979427671 + wwv_flow_api.g_id_offset,
  p_associated_column=> 'TAX_RATE',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18315632089427675 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_tabular_form_region_id => 18312420559427663 + wwv_flow_api.g_id_offset,
  p_validation_name => 'AMOUNT_INCL_TAX must be numeric',
  p_validation_sequence=> 100,
  p_validation => 'AMOUNT_INCL_TAX',
  p_validation_type => 'COL_IS_NUMERIC',
  p_error_message => '#COLUMN_HEADER# must be numeric.',
  p_when_button_pressed=> 18313814979427671 + wwv_flow_api.g_id_offset,
  p_associated_column=> 'AMOUNT_INCL_TAX',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_da_event (
  p_id => 18330727538702242 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_name => 'setAddress'
 ,p_event_sequence => 10
 ,p_triggering_element_type => 'ITEM'
 ,p_triggering_element => 'P117_ADDRESS_LOV'
 ,p_triggering_condition_type => 'NOT_NULL'
 ,p_bind_type => 'bind'
 ,p_bind_event_type => 'change'
  );
wwv_flow_api.create_page_da_action (
  p_id => 18331027620702244 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18330727538702242 + wwv_flow_api.g_id_offset
 ,p_event_result => 'TRUE'
 ,p_action_sequence => 10
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_SET_VALUE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_ADDRESS'
 ,p_attribute_01 => 'FUNCTION_BODY'
 ,p_attribute_06 => 'declare'||chr(10)||
' l_address varchar2(500);'||chr(10)||
'begin'||chr(10)||
'select address1||'', ''||chr(13)||'||chr(10)||
'       nvl2(street,street||'', ''||chr(13),'''')||'||chr(10)||
'       nvl2(village,village||'', ''||chr(13),'''')||'||chr(10)||
'       nvl2(town,town||'', ''||chr(13),'''')||'||chr(10)||
'       nvl2(region,region||'', ''||chr(13),'''')||'||chr(10)||
'       nvl2(country,country||'', ''||chr(13),'''')||'||chr(10)||
'       nvl2(postcode,postcode||'', ''||chr(13),'''')||'||chr(10)||
'       nvl2(city,city,'''') '||chr(10)||
'into l_address'||chr(10)||
'from address'||chr(10)||
'where address_id = :P117_ADDRESS_LOV;'||chr(10)||
':P117_ADDRESS := l_address;'||chr(10)||
'return l_address;'||chr(10)||
'end;'
 ,p_attribute_07 => 'P117_ADDRESS,P117_ADDRESS_LOV'
 ,p_attribute_08 => 'N'
 ,p_stop_execution_on_error => 'N'
 );
wwv_flow_api.create_page_da_action (
  p_id => 18332119760813525 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18330727538702242 + wwv_flow_api.g_id_offset
 ,p_event_result => 'FALSE'
 ,p_action_sequence => 10
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_SET_VALUE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_ADDRESS'
 ,p_attribute_01 => 'STATIC_ASSIGNMENT'
 ,p_stop_execution_on_error => 'Y'
 );
wwv_flow_api.create_page_da_action (
  p_id => 18334014415001214 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18330727538702242 + wwv_flow_api.g_id_offset
 ,p_event_result => 'TRUE'
 ,p_action_sequence => 20
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_DISABLE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_ADDRESS'
 ,p_stop_execution_on_error => 'Y'
 );
wwv_flow_api.create_page_da_action (
  p_id => 18334219263002658 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18330727538702242 + wwv_flow_api.g_id_offset
 ,p_event_result => 'FALSE'
 ,p_action_sequence => 20
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_DISABLE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_ADDRESS'
 ,p_stop_execution_on_error => 'Y'
 );
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_da_event (
  p_id => 18334902135111231 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_name => 'setXrate'
 ,p_event_sequence => 20
 ,p_triggering_element_type => 'ITEM'
 ,p_triggering_element => 'P117_INVOICE_DATE'
 ,p_triggering_condition_type => 'NOT_NULL'
 ,p_bind_type => 'bind'
 ,p_bind_event_type => 'change'
  );
wwv_flow_api.create_page_da_action (
  p_id => 18335404495111245 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18334902135111231 + wwv_flow_api.g_id_offset
 ,p_event_result => 'TRUE'
 ,p_action_sequence => 10
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_SET_VALUE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_EXCHANGE_RATE'
 ,p_attribute_01 => 'FUNCTION_BODY'
 ,p_attribute_06 => 'declare'||chr(10)||
'  cr varchar2(5);'||chr(10)||
'begin'||chr(10)||
'select functional_currency'||chr(10)||
'into cr '||chr(10)||
'from entity where entity_id = :F112_ENTITY_ID;'||chr(10)||
''||chr(10)||
'return nvl(exchange_rate_pkg.get_converted_value (:P117_CURRENCY_CODE, cr, :P117_INVOICE_DATE, 1),0);'||chr(10)||
'end;'||chr(10)||
''
 ,p_attribute_07 => 'P117_INVOICE_DATE,P117_CURRENCY_CODE,F112_ENTITY_ID'
 ,p_attribute_08 => 'N'
 ,p_stop_execution_on_error => 'N'
 );
wwv_flow_api.create_page_da_action (
  p_id => 18335603782111245 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18334902135111231 + wwv_flow_api.g_id_offset
 ,p_event_result => 'FALSE'
 ,p_action_sequence => 10
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_SET_VALUE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_EXCHANGE_RATE'
 ,p_attribute_01 => 'STATIC_ASSIGNMENT'
 ,p_stop_execution_on_error => 'Y'
 );
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_da_event (
  p_id => 18364000575485400 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_name => 'setCurrency'
 ,p_event_sequence => 30
 ,p_triggering_element_type => 'ITEM'
 ,p_triggering_element => 'P117_CONTRACT_ID'
 ,p_triggering_condition_type => 'NOT_NULL'
 ,p_bind_type => 'bind'
 ,p_bind_event_type => 'change'
 ,p_display_when_type => 'NEVER'
  );
wwv_flow_api.create_page_da_action (
  p_id => 18364531164485406 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18364000575485400 + wwv_flow_api.g_id_offset
 ,p_event_result => 'TRUE'
 ,p_action_sequence => 10
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_SET_VALUE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_CURRENCY_CODE'
 ,p_attribute_01 => 'SQL_STATEMENT'
 ,p_attribute_03 => 'select currency_code from contract'||chr(10)||
'WHERE contract_id = :P117_CONTRACT_ID'
 ,p_attribute_07 => 'P117_CONTRACT_ID'
 ,p_attribute_08 => 'Y'
 ,p_stop_execution_on_error => 'N'
 );
wwv_flow_api.create_page_da_action (
  p_id => 18364732193485406 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18364000575485400 + wwv_flow_api.g_id_offset
 ,p_event_result => 'FALSE'
 ,p_action_sequence => 10
 ,p_execute_on_page_init => 'Y'
 ,p_action => 'NATIVE_SET_VALUE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_CURRENCY_CODE'
 ,p_attribute_01 => 'STATIC_ASSIGNMENT'
 ,p_stop_execution_on_error => 'Y'
 );
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_da_event (
  p_id => 18374820493896649 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_name => 'Get_Exchange_Rate'
 ,p_event_sequence => 40
 ,p_triggering_element_type => 'ITEM'
 ,p_triggering_element => 'P117_CURRENCY_CODE'
 ,p_triggering_condition_type => 'NOT_NULL'
 ,p_bind_type => 'live'
 ,p_bind_event_type => 'change'
  );
wwv_flow_api.create_page_da_action (
  p_id => 18375120051896655 + wwv_flow_api.g_id_offset
 ,p_flow_id => wwv_flow.g_flow_id
 ,p_page_id => 117
 ,p_event_id => 18374820493896649 + wwv_flow_api.g_id_offset
 ,p_event_result => 'TRUE'
 ,p_action_sequence => 10
 ,p_execute_on_page_init => 'N'
 ,p_action => 'NATIVE_SET_VALUE'
 ,p_affected_elements_type => 'ITEM'
 ,p_affected_elements => 'P117_EXCHANGE_RATE'
 ,p_attribute_01 => 'FUNCTION_BODY'
 ,p_attribute_06 => 'declare'||chr(10)||
'  cr varchar2(5);'||chr(10)||
'begin'||chr(10)||
'select functional_currency'||chr(10)||
'into cr '||chr(10)||
'from entity where entity_id = :F112_ENTITY_ID;'||chr(10)||
''||chr(10)||
'return nvl(exchange_rate_pkg.get_converted_value (:P117_CURRENCY_CODE, cr, :P117_INVOICE_DATE, 1),0);'||chr(10)||
'end;'||chr(10)||
''
 ,p_attribute_07 => 'P117_CURRENCY_CODE,P117_INVOICE_DATE,F112_ENTITY_ID'
 ,p_attribute_08 => 'Y'
 ,p_stop_execution_on_error => 'Y'
 );
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:PURCHASE_HEADER:P117_PURCHASE_HEADER_ID:PURCHASE_HEADER_ID';

wwv_flow_api.create_page_process(
  p_id     => 18295426329955814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from PURCHASE_HEADER',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
' l_temp number;'||chr(10)||
'begin'||chr(10)||
''||chr(10)||
'  select rate_unit,bill_rate'||chr(10)||
'  into :P117_RATE_UNIT,:P117_BILL_RATE'||chr(10)||
'  from contract'||chr(10)||
'  where contract_id = :P117_CONTRACT_ID;'||chr(10)||
''||chr(10)||
'exception when others then null;'||chr(10)||
''||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 18372602565955621 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_process_sequence=> 50,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'getContractInfo',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  function get_pk return varchar2 '||chr(10)||
'  is '||chr(10)||
'  begin '||chr(10)||
'    for c1 in (select PURCHASE_HEADER_SQ1.nextval next_val'||chr(10)||
'               from dual)'||chr(10)||
'    loop'||chr(10)||
'        return c1.next_val;'||chr(10)||
'    end loop;'||chr(10)||
'  end; '||chr(10)||
'begin '||chr(10)||
'  :P117_PURCHASE_HEADER_ID := get_pk; '||chr(10)||
'end; ';

wwv_flow_api.create_page_process(
  p_id     => 18295622008955814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Get PK',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to get primary key item value.',
  p_process_when_button_id=>18292527410955800 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:PURCHASE_LINES:PURCHASE_LINE_ID';

wwv_flow_api.create_page_process(
  p_id     => 18315700754427675 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'MULTI_ROW_UPDATE',
  p_process_name=> 'ApplyMRU',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process update.',
  p_process_when_button_id=>18292619505955800 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '#MRU_COUNT# row(s) updated, #MRI_COUNT# row(s) inserted.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:PURCHASE_LINES:PURCHASE_LINE_ID';

wwv_flow_api.create_page_process(
  p_id     => 18315932761427675 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_process_sequence=> 20,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'MULTI_ROW_DELETE',
  p_process_name=> 'ApplyMRD',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process delete.',
  p_process_when=>'MULTI_ROW_DELETE',
  p_process_when_type=>'REQUEST_EQUALS_CONDITION',
  p_process_success_message=> '#MRD_COUNT# row(s) deleted.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:PURCHASE_HEADER:P117_PURCHASE_HEADER_ID:PURCHASE_HEADER_ID|IUD';

wwv_flow_api.create_page_process(
  p_id     => 18295818172955815 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of PURCHASE_HEADER',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table PURCHASE_HEADER.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'117';

wwv_flow_api.create_page_process(
  p_id     => 18296002563955815 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 117,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>18292724881955800 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 117
--
 
begin
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18316514456435374 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 1,
  p_query_column_name=> 'PURCHASE_LINE_ID',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18316613890435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 2,
  p_query_column_name=> 'PURCHASE_LINE_ID_DISPLAY',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18316709448435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 3,
  p_query_column_name=> 'PURCHASE_HEADER_ID',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18316814178435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 4,
  p_query_column_name=> 'LINE_NUMBER',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18337923244682158 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 5,
  p_query_column_name=> 'DESCRIPTION',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18316905578435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 6,
  p_query_column_name=> 'EXPENSE_ID',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18338109170682158 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 7,
  p_query_column_name=> 'QUANTITY',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18317012316435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 8,
  p_query_column_name=> 'UOM',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18317105266435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 9,
  p_query_column_name=> 'UNIT_PRICE',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18317203559435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 10,
  p_query_column_name=> 'AMOUNT_EXCL_TAX',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18317303144435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 11,
  p_query_column_name=> 'TAX_RATE',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18338619067682158 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 12,
  p_query_column_name=> 'TAX_AMOUNT',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
wwv_flow_api.create_region_rpt_cols (
  p_id     => 18317418888435375 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_plug_id=> 18312420559427663 + wwv_flow_api.g_id_offset,
  p_column_sequence=> 13,
  p_query_column_name=> 'AMOUNT_INCL_TAX',
  p_display_as=> 'TEXT',
  p_column_comment=> '');
 
null;
end;
null;
 
end;
/

commit;
begin 
execute immediate 'begin dbms_session.set_nls( param => ''NLS_NUMERIC_CHARACTERS'', value => '''''''' || replace(wwv_flow_api.g_nls_numeric_chars,'''''''','''''''''''') || ''''''''); end;';
end;
/
set verify on
set feedback on
prompt  ...done
